#pragma once

#include <cftf/boot/userapp.h>

class App : public cftf::boot::UserApp, public cftf::util::Singleton<App>
{
    friend class cftf::util::Singleton<App>;
private:
    App();

public:

    virtual const std::string GetPkgName() override;
    virtual int GetPreprocessThreadNum() override;
    virtual void Init() override;
    virtual void UnInit() override;
    virtual void Update(unsigned int diff) override;
    virtual bool HasTask() override;
    virtual void DispatchSocketMsg(cftf::net::MsgHdr* hdr) override;
    virtual void PreprocessSocketMsg(cftf::net::MsgHdr* hdr) override;

private:

    void RegisterConstant();
    void DispatchGGMsg(cftf::net::MsgHdr* hdr);

};
